﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>2024年会抽奖</title>
    <link rel="stylesheet" href="css/style.css?v=7">
</head>
<body>
<div class='luck-back'>
    <div class="startChoujiang">
        <h1>2024年会抽奖</h1>
        <div class="luck-content ce-pack-end">
            <div id="luckuser" class="slotMachine">
                <div class="slot">
                    <span class="name" style="font-weight:bolder;font-size:xx-large;color: #f0d03a;">姓名</span>
                </div>
            </div>
            <div class="luck-content-btn">
                <a id="start" class="start" onclick="start()">开始</a>
                <a id="javascript:void(0);" class="start" onclick="javascript:history.go(0);">返回重新设置中奖人数</a>
            </div>
            <div class="luck-user">
                <div class="luck-user-title">
                    <span>中奖名单</span>
                </div>
				<div>
					<ul class="luck-user-list appendTxt1"></ul>
					<ul class="luck-user-list appendTxt2"></ul>
				</div>
            </div>
        </div>
    </div>
    <div class="choujiangSet">
        <h1>2024年会抽奖初始设置</h1>
        <form id="theForm" style="text-align: center;line-height: 80px;">
			<select name="title" style="width: 250px;height: 50px">
				<option>请选择奖品等级</option>
				<option value="5-1">星辰大海奖</option>
				<option value="5-2">群星璀璨幸运奖</option>
				<option value="5-3">龙翔万里奖</option>
				<option value="5-4">百牛献瑞普天奖</option>
				<option value="5-5">五等奖-5</option>
				<option value="4-1">三星耀世惊喜奖</option>
				<option value="4-2">龙跃九州奖</option>
				<option value="4-3">牛转乾坤奖</option>
				<option value="3">牛市领航先锋奖</option>
				<option value="2">六六大顺牛运奖</option>
				<option value="1">一牛独尊龙腾大奖</option>
			</select>
            <div class="luck-content-btn" style="width: 100%">
                <a onclick="startToStart()">开始</a>
            </div>
        </form>
    </div>
    <a href="javascript:resetPeople();" style="position: absolute;bottom: 0;right: 0;color: red;">重置抽奖结果</a>
</div>

<script src="js/jquery-2.2.1.min.js" type="text/javascript"></script>
<script src="js/people.js?v=3" type="text/javascript"></script>
<script src="js/Luckdraw.js?v=3" type="text/javascript"></script>
<script>
	var localName = "test";
	var localPeople = new Array();
	function startToStart(){
		var title = $('select option:selected').val();
		var title_txt = $('select option:selected').text();

		var phoneTmp=JSON.parse(localStorage.getItem(title_txt));
		if(phoneTmp != null){
			alert("当前等级的奖品以及抽取过了，不可重复抽取");
			return;
		}

		var lottery_number = LotterynumberArr[title];
		console.log("LotterynumberArr",LotterynumberArr);
		console.log("lottery_number",lottery_number);
		if(!lottery_number || lottery_number>phone.length){
			alert("请设置正确的中奖人数");
			return;
		}
		if(title != '') {
			$(".startChoujiang h1").html(title_txt);
			localName = title_txt;
		}
		Lotterynumber = lottery_number;
		$(".choujiangSet").hide().siblings('.startChoujiang').show();
		start();
	}
	function resetPeople(){
		localStorage.removeItem("canYuChouJiangRen");
		alert("重置成功");
		history.go(0);
	}

</script>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
</div>
</body>
</html>
